package com.infonam.data.source.model;

import java.util.Date;

import javax.persistence.AssociationOverride;
import javax.persistence.AssociationOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name="film_category", catalog="sakila")
@AssociationOverrides({
	@AssociationOverride(name="pk.fiml" , joinColumns=@JoinColumn(name="film_id")),
	@AssociationOverride(name="pk.category",joinColumns=@JoinColumn(name="category_id"))
})
public class FilmCategory {
	@EmbeddedId
	private FilmCategoryId pk = new FilmCategoryId();
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="last_update", columnDefinition="TIMESTAMP default CURRENT_TIMESTAMP on update TIMESTAMP")
	private Date last_update;
	public FilmCategoryId getPk() {
		return pk;
	}
	public Date getLast_update() {
		return last_update;
	}
	public void setLast_update(Date last_update) {
		this.last_update = last_update;
	}

}
